import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import pxtovw from "postcss-px-to-viewport";
const usePxtovw = pxtovw({
  viewprotWidth: 375,
  viewprotUnit: "vw",
});
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  base: process.env.NODE_ENV === "production" ? "./" : "/",
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
    },
  },
  css: {
    postcss: {
      plugins: [usePxtovw],
    },
  },
});
